import pymysql
conn=pymysql.connect(
    host='127.0.0.1',
    port=3306,
    user='root',
    passwd='123456',
    db='gamedb',
    charset='utf8'
)
cursor=conn.cursor()
#生成碗
insert_sql="INSERT INTO student VALUES (%s , %s)"
select_sql="SELECT * stu_num, name FROM student "
cursor.excute(select_sql)
print(cursor.fetchone())
#result=cursor.execute(insert_sql,(1,'数数'))

cursor.executemany(insert_sql,[(2,'静静'),(3,'丫丫'),(4,'静丫丫'),(5,'漂亮姐')])#多行插入的命令
#print(cursor.fetchmany(2))
#print(cursor.fetchall())
conn.commit()
cursor.close()
conn.close()
